package com.situ.mall.design.observer2;


import java.util.Observable;

public class NewsPaper extends Observable {
    //报纸的内容
    private String content;

    public void setContent(String content) {
        this.content = content;
        //如果使用Java的Observer模式的时候，必须加上这句话
        setChanged();
        //notifyObservers(content);
        notifyObservers();
    }

    public String getContent() {
        return content;
    }
}
